using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._RasterProcessing
{
    /// <summary>
    /// <para>Generate Table From Raster Function</para>
    /// <para>Converts a raster function dataset to a table or feature class.  The input raster function should be a raster function designed to output a table or feature class.</para>
    /// <para>将栅格函数数据集转换为表或要素类。 输入栅格函数应为用于输出表或要素类的栅格函数。</para>
    /// </summary>    
    [DisplayName("Generate Table From Raster Function")]
    public class GenerateTableFromRasterFunction : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateTableFromRasterFunction()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_raster_function">
        /// <para>Input Raster Function</para>
        /// <para>The function template or function JSON object that outputs a table or feature class.</para>
        /// <para>输出表或要素类的函数模板或函数 JSON 对象。</para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output Table</para>
        /// <para>The path, file name, and type (extension) of the output table or feature class.</para>
        /// <para>输出表或要素类的路径、文件名和类型（扩展名）。</para>
        /// </param>
        public GenerateTableFromRasterFunction(object _raster_function, object _out_table)
        {
            this._raster_function = _raster_function;
            this._out_table = _out_table;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Generate Table From Raster Function";

        public override string CallName => "management.GenerateTableFromRasterFunction";

        public override List<string> AcceptEnvironments => ["cellSize", "extent", "gpuID", "parallelProcessingFactor", "processorType", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_raster_function, _out_table, _raster_function_arguments];

        /// <summary>
        /// <para>Input Raster Function</para>
        /// <para>The function template or function JSON object that outputs a table or feature class.</para>
        /// <para>输出表或要素类的函数模板或函数 JSON 对象。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster Function")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _raster_function { get; set; }


        /// <summary>
        /// <para>Output Table</para>
        /// <para>The path, file name, and type (extension) of the output table or feature class.</para>
        /// <para>输出表或要素类的路径、文件名和类型（扩展名）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Raster Function Arguments</para>
        /// <para>The function arguments and their values to be set. Each raster function has its own arguments and values, which are listed in the dialog of the tool.</para>
        /// <para>要设置的函数参数及其值。每个栅格函数都有自己的参数和值，这些参数和值列在工具的对话框中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Raster Function Arguments")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _raster_function_arguments { get; set; } = null;


        public GenerateTableFromRasterFunction SetEnv(object cellSize = null, object extent = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(cellSize: cellSize, extent: extent, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}